<template>
  <div class="payment">
    <div class="payment-text">
      <img src="../../../public/images/payment.png" alt="" />
      <p style="font-weight: bold">订单支付成功</p>
      <van-button
        type="primary"
        block
        style="margin-bottom: 10px; border-radius: 30px"
        @click="gohome"
        >返回首页</van-button
      >
      <van-button
        type="primary"
        block
        style="background-color: #fff; color: green; border-radius: 30px"
        @click="goorder"
        >查看订单</van-button
      >
    </div>
  </div>
</template>

<script>
import router from "@/router";

export default {
  methods: {
    // 跳转首页
    gohome() {
      router.replace("/home");
    },
    // 查看订单
    goorder() {
      router.replace({ path: "/order", query: { active: 1 } });
    },
  },
};
</script>

<style lang="scss">
.payment {
  width: 100%;
  height: 100%;
  .payment-text {
    width: 50vw;
    height: 50vh;
    position: absolute;
    left: 25%;
    top: 25%;
    text-align: center;
  }
}
</style>
